import vue from '@vitejs/plugin-vue'
import { defineConfig } from 'vite'

export default defineConfig({
    plugins: [vue()],
    optimizeDeps: {
        include: ['schart.js']
    },
    server: {
        port: 8888,
        host: '0.0.0.0',
        open: './src/views/login.vue',
        proxy: {
             '/api': {
                //  target: 'http://47.113.196.188:8080',
                 target: 'http://127.0.0.1:8080',
                 changeOrigin: true,
                 rewrite: (path) => path.replace(/^\/api/, '')
             }
        }
    }
})